﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace C4F.DevKit.Bluetooth
{
    namespace FileTransferProfile
    {

        /// <summary>
        /// EventArgs class to be used when an CreateFolder operation completes.
        /// </summary>
        public class CreateFolderCompletedEventArgs : AsyncCompletedEventArgs
        {
            #region Private Members

            /// <summary>
            /// The Location of the folder to be created on remote device.
            /// </summary>
            private string remFolderPath;

            /// <summary>
            /// Flag indicating whether non-exisitng parent directories are
            /// created.
            /// </summary>
            private bool createParentDirectories;

            #endregion

            #region Public Properties

            /// <summary>
            /// Gets the location of the folder to be created on remote device.
            /// </summary>
            public string RemoteFolderPath
            {
                get
                { return this.remFolderPath; }
            }

            /// <summary>
            /// Gets the flag indicating whether non-exisitng parent 
            /// directories are created.
            /// </summary>
            public bool CreateParentDirectories
            {
                get
                { return this.createParentDirectories; }
            }

            #endregion

            #region Constructor
            /// <summary>
            /// Initializes the CreateFolderCompletedEventArgs object.
            /// </summary>
            /// <param name="remoteFolderPath">The Location of the folder to 
            /// be created on remote device.</param>
            /// <param name="createParentDirectories">Flag indicating whether 
            /// non-exisitng parent directories are created.</param>
            /// <param name="error">An error that occurred during the 
            /// asynchronous operation.</param>
            /// <param name="cancelled">A value indicating whether the 
            /// asynchronous operation was cancelled.</param>
            /// <param name="userState">The user-supplied state object 
            /// supplied when the asynchronous operation was requested.</param>

            public CreateFolderCompletedEventArgs(string remoteFolderPath,
                                                  bool createParentDirectories,
                                                  Exception error,
                                                  bool cancelled,
                                                  object userState)
                : base(error, cancelled, userState)
            {

                this.remFolderPath = remoteFolderPath;
                this.createParentDirectories = createParentDirectories;
            }
            #endregion
        }
    }

}